Skip to content

fix: test v2 benchmarks on ci#1238

Merged
ysmolski merged 3 commits intomasterfrom
yury/eng-7616-engine-run-v2-benchmark-on-ci-to-detect-regression-early
Jul 25, 2025
Merged

fix: test v2 benchmarks on ci#1238
ysmolski merged 3 commits intomasterfrom
yury/eng-7616-engine-run-v2-benchmark-on-ci-to-detect-regression-early

Conversation

@ysmolski
Copy link
Copy Markdown
Contributor

@ysmolski ysmolski commented Jul 17, 2025

Include benchmarks into quick tests of v2.

In addition, I have attempted to simplify Makefile rules for testing. Instead of aliasing let's use "test" and "test-quick" rules directly from github workflows.

Specifically changes in Makefile rules:

test-no-race was removed as duplicate of test-quick ,
ci and ci-full were removed, github workflow was made to use test and test-quick

Summary by CodeRabbit

Summary by CodeRabbit

  • Chores

    • Updated continuous integration workflows to use a faster test command.
    • Simplified Makefiles by removing redundant and unused test-related targets.
    • Adjusted test configurations to reduce unnecessary output during test runs.
    • Excluded specific tests from Windows builds to improve compatibility.
  • Refactor

    • Improved test command flags for more consistent and efficient test execution.

Checklist

  • I have discussed my proposed changes in an issue and have received approval to proceed.
  • I have followed the coding standards of the project.
  • Tests or benchmarks have been added or updated.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jul 17, 2025

"""

Walkthrough

This change updates GitHub Actions workflows to replace the use of removed Makefile targets (ci and ci-quick) with test-quick in both execution and v2 jobs. It also removes redundant or unused test-related targets from the execution/Makefile and v2/Makefile, adjusts test flags and commands to separate tests and benchmarks, disables printing of query plans in a federation test, and adds OS build constraints to exclude a test file from Windows builds.

Changes

Files/Paths Change Summary
.github/workflows/execution.yml, .github/workflows/v2.yml Renamed CI step to "Quick tests & benchmarks"; changed command from make ci to make test-quick.
execution/Makefile Removed ci, ci-quick, and test-no-race phony targets and commands.
v2/Makefile Removed ci, ci-quick/ci-full, test-no-race targets; modified test-quick to run tests and benchmarks separately without -count=1. Removed .PHONY: test.
v2/pkg/engine/datasource/graphql_datasource/graphql_datasource_federation_test.go Changed PrintQueryPlans flag in test configuration from true to false.
v2/pkg/netpoll/fd_test.go Added build constraint to exclude file from Windows compilation.

Possibly related PRs

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes
"""

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f5f6358 and 0354160.

📒 Files selected for processing (6)
  • .github/workflows/execution.yml (1 hunks)
  • .github/workflows/v2.yml (1 hunks)
  • execution/Makefile (0 hunks)
  • v2/Makefile (1 hunks)
  • v2/pkg/engine/datasource/graphql_datasource/graphql_datasource_federation_test.go (1 hunks)
  • v2/pkg/netpoll/fd_test.go (1 hunks)
💤 Files with no reviewable changes (1)
  • execution/Makefile
✅ Files skipped from review due to trivial changes (2)
  • v2/pkg/netpoll/fd_test.go
  • .github/workflows/execution.yml
🚧 Files skipped from review as they are similar to previous changes (3)
  • .github/workflows/v2.yml
  • v2/pkg/engine/datasource/graphql_datasource/graphql_datasource_federation_test.go
  • v2/Makefile
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Build and test (go 1.23 / ubuntu-latest)
  • GitHub Check: Build and test (go 1.23 / windows-latest)
  • GitHub Check: Build and test (go 1.23 / windows-latest)
  • GitHub Check: Build and test (go 1.23 / ubuntu-latest)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch yury/eng-7616-engine-run-v2-benchmark-on-ci-to-detect-regression-early

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (4)
v2/pkg/engine/datasource/graphql_datasource/graphql_datasource_federation_test.go (1)

14686-14688: Consider making the debug switch runtime-configurable

Hard-coding PrintQueryPlans: false keeps CI logs clean, but it also makes ad-hoc troubleshooting harder because re-enabling requires modifying and re-committing test code. Allowing an environment variable override (defaulting to false) provides flexibility without polluting logs in normal runs.

-               Debug: plan.DebugConfiguration{
-                   PrintQueryPlans: false,
-               },
+               Debug: plan.DebugConfiguration{
+                   PrintQueryPlans: os.Getenv("WG_PRINT_QUERY_PLANS") == "1",
+               },

You’d just need to import "os" at the top of the file (or in the existing import block).
Developers could then run WG_PRINT_QUERY_PLANS=1 go test ./... locally for deep inspection while CI remains silent.

v2/Makefile (1)

11-13: test-quick might silently miss race conditions & long-running tests

Quick tests intentionally trade depth for speed, but two tweaks would give you broader safety at virtually no cost:

-go test -count=1 -run=. -bench=. -benchtime=1x ./...
+go test -race -short -count=1 -run=. -bench=. -benchtime=1x ./...

-race keeps the data-race net in place (only ~1.3-1.5× slower for most packages).
-short lets packages respect testing.Short() and skip truly heavy cases, so overall wall-time stays low.

If you do adopt -race, remember to gate it in the workflow (skip on Windows) the same way the full test does.

.github/workflows/execution.yml (1)

38-40: Step label no longer reflects the action

Now that the command is make test-quick, consider renaming the step to “Quick tests & benchmarks” to keep workflow logs self-describing:

-      - name: CI
+      - name: Quick tests & benchmarks
         working-directory: execution
-        run: make test-quick
+        run: make test-quick

Purely cosmetic but helps future triage.

.github/workflows/v2.yml (1)

41-44: Align step name with the new make test-quick command

Same naming nitpick as in the execution workflow to keep logs crystal-clear:

-      - name: CI
+      - name: Quick tests & benchmarks
         working-directory: v2
         run: make test-quick
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5afbc68 and fb05ea8.

📒 Files selected for processing (5)
  • .github/workflows/execution.yml (1 hunks)
  • .github/workflows/v2.yml (1 hunks)
  • execution/Makefile (0 hunks)
  • v2/Makefile (2 hunks)
  • v2/pkg/engine/datasource/graphql_datasource/graphql_datasource_federation_test.go (1 hunks)
💤 Files with no reviewable changes (1)
  • execution/Makefile
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Build and test (go 1.23 / windows-latest)
  • GitHub Check: Build and test (go 1.23 / ubuntu-latest)
  • GitHub Check: Build and test (go 1.23 / ubuntu-latest)
  • GitHub Check: Build and test (go 1.23 / windows-latest)
🔇 Additional comments (1)
v2/Makefile (1)

3-3: -count=1 flag addition is spot-on
Guarantees a fresh run every time and avoids puzzling cache-hits in CI.

Comment thread v2/pkg/netpoll/fd_test.go Outdated
Comment thread v2/Makefile Outdated
Comment thread v2/Makefile Outdated
@ysmolski ysmolski requested a review from devsergiy July 18, 2025 15:35
ysmolski added 3 commits July 25, 2025 13:51
Include benchmarks into quick tests of v2.

In addition, I have attempted to simplify Makefile rules for testing.
Instead of aliasing let's use "test" and "test-quick" rules directly
from github workflows.
@ysmolski ysmolski force-pushed the yury/eng-7616-engine-run-v2-benchmark-on-ci-to-detect-regression-early branch from f5f6358 to 0354160 Compare July 25, 2025 10:55
@ysmolski ysmolski merged commit d9cfb21 into master Jul 25, 2025
11 checks passed
@ysmolski ysmolski deleted the yury/eng-7616-engine-run-v2-benchmark-on-ci-to-detect-regression-early branch July 25, 2025 11:05
Noroth pushed a commit that referenced this pull request Jul 28, 2025
🤖 I have created a release *beep* *boop*
---


##
[2.0.0-rc.211](v2.0.0-rc.210...v2.0.0-rc.211)
(2025-07-28)


### Features

* redesign handling for lists in gRPC
([#1246](#1246))
([a06c9db](a06c9db))


### Bug Fixes

* disable minifier for gRPC datasource
([#1249](#1249))
([9a26e5c](9a26e5c))
* test v2 benchmarks on ci
([#1238](#1238))
([d9cfb21](d9cfb21))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
  * Redesigned handling of lists in the gRPC datasource.

* **Bug Fixes**
  * Disabled the minifier for the gRPC datasource.
* Enabled testing of version 2 benchmarks on continuous integration
(CI).

* **Documentation**
  * Added a changelog entry for version 2.0.0-rc.211.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants